Skip to content

AccountMenu: add social login pending/error feedback and lock both providers during auth#223

Merged
na-trium-144 merged 6 commits into
mainfrom
copilot/add-loading-spinner-for-login
Jul 21, 2026
Merged

AccountMenu: add social login pending/error feedback and lock both providers during auth#223
na-trium-144 merged 6 commits into
mainfrom
copilot/add-loading-spinner-for-login

Conversation

Copilot AI commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

GitHub/Google login from AccountMenu could appear unresponsive during slow auth redirects, with no user feedback and no failure signal. This change adds explicit pending/error UX so users can distinguish “in progress” from “failed”.

  • Pending state + mutual button lock

    • Added local signingInProvider state ("github" | "google" | null).
    • Clicking either social login button now disables both buttons until auth resolves/fails.
    • The clicked provider button shows an inline spinner (loading-spinner) while pending.
  • Centralized social sign-in handler

    • Introduced signInWithSocial(provider) to unify callback URL construction and pending-state handling.
    • Guards against duplicate clicks while a sign-in is already in progress.
  • Failure feedback

    • Added signinErrorMessage state.
    • On social auth failure, pending state is cleared and an inline Japanese error message is rendered in the menu.
<button
  onClick={() => signInWithSocial("github")}
  disabled={signingInProvider !== null}
  aria-busy={signingInProvider === "github"}
>
  {signingInProvider === "github" && (
    <span className="loading loading-spinner loading-xs" />
  )}
  GitHub でログイン
</button>

Copilot AI changed the title [WIP] Add loading spinner and disable buttons for GitHub and Google login AccountMenu: add social login pending/error feedback and lock both providers during auth Jul 21, 2026
Copilot AI requested a review from na-trium-144 July 21, 2026 02:35
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 21, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
my-code 9c5cad5 Commit Preview URL

Branch Preview URL
Jul 21 2026, 05:00 AM

@na-trium-144
na-trium-144 marked this pull request as ready for review July 21, 2026 04:56
@na-trium-144
na-trium-144 merged commit 66010e3 into main Jul 21, 2026
8 of 10 checks passed
@na-trium-144
na-trium-144 deleted the copilot/add-loading-spinner-for-login branch July 21, 2026 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitHub/Googleログインのフィードバックがない

2 participants